{extend name="layout/layout" /}

{block name="title"}组长管理{/block}

登录页

{block name="content"}
<a href="{:url('index/admin')}">微信号管理</a>


<h3>组长管理</h3>
<a class="logio" href="{:url('index/logout')}">注销</a>

<table border="1">
    <tr>
        <th>组长名</th>
        <th>所属分组</th>
        <th>密码</th>
        <th colspan="2">操作</th>
    </tr>
    {volist name="users" id="user"}
    <tr>
    <form method="POST" action="{:url('user/update')}">
        <input type="hidden" name="id" value="{$user.id}">
        <td><input type="text" name="username" value="{$user.username}"></td>
        <td>
            <select name="group_id">
                {empty name="$user.group_id"}
                    <option selected="">无</option>
                {/empty}
                {volist name="groups" id="group"}
                <option value="{$group.id}" {if condition="$user.group_id eq $group.id"}selected{/if}>{$group.name}</option>
                {/volist}
            </select>
        </td>
        <td><input type="text" name="password"></td>
        <td><input type="submit" value="确认修改"></td>
        <td><a href="">删除</a></td>
    </form>
    </tr>
    {/volist}
</table>
<hr>

<h4>新增组长</h4>
<form action="{:url('index/user/save')}" method="POST">
    所属分组：
    <select name="group_id">
        {volist name="groups" id="group"}
        <option value="{$group.id}">{$group.name}</option>
        {/volist}
    </select>
    <br>
    组长名：<input type="text" name="username"><br>
    密码：<input type="text" name="password"><br>
    <input type="submit" value="确定">
</form>
<hr>

{/block}
